home *** CD-ROM | disk | FTP | other *** search
- Path: news.magg.net!news
- From: n4mwd@magg.net (Dennis Hawkins)
- Newsgroups: comp.lang.c
- Subject: Re: How to check array lenght?
- Date: Thu, 22 Feb 1996 04:02:58 GMT
- Organization: M.A.G. Information Services (MAGG.NET)
- Message-ID: <4ggmfs$tg@dopey.magg.net>
- References: <4gbphl$ht@malakor.kku.ac.th> <Pine.A32.3.91.960221002504.156335H-100000@black.weeg.uiowa.edu>
- NNTP-Posting-Host: wpb-141.magg.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- The Amorphous Mass <robinson@blue.weeg.uiowa.edu> wrote:
-
- >On 20 Feb 1996, terdthai tong-un wrote:
-
- >> In subroutine that recieve pointer of array.
- >> How to check number of multidimention array in that routine?
-
- > You can't. That information would have to be passed to the function
- >via extra parameters or some other means.
-
- Try using:
-
- #define numelem(array) (sizeof(array) / sizeof(array[0]))
-
- then pass the results as an extra parameter to your function.
-
-
- Dennis Hawkins
- n4mwd@amsat.org
-
-